package com.quanyue.music.file.mapper;

import com.quanyue.music.domain.constant.FMType;
import com.quanyue.music.domain.entity.Fm;
import com.quanyue.music.file.mapper.provider.FMFileListProvider;
import com.quanyue.music.file.type.FMDetailList;
import com.quanyue.music.file.type.FMDetailRequest;
import com.quanyue.music.file.type.FMListExcel;
import com.shzisg.mybatis.mapper.auto.AutoMapper;
import com.shzisg.mybatis.mapper.page.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

@Mapper
public interface FMFileMapper extends AutoMapper <Fm> {

    @SelectProvider(type = FMFileListProvider.class, method = "findList")
    Page <FMDetailList> findList(FMDetailRequest request);

    @SelectProvider(type = FMFileListProvider.class, method = "findExcelList")
    List <FMDetailList> findExcelList(FMListExcel request);

    Fm findByType(@Param("type") FMType type);
}
